package com.cos.emp.web.controller;

import com.cos.emp.entity.Dept;
import com.cos.emp.services.DeptServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author: COS
 * @time: 2022/9/30 16:09
 * @description:
 */
@Controller
@RequestMapping
public class DeptController {
    @Autowired
    private DeptServices deptServices;

    @RequestMapping("/dept/getAll")
    @ResponseBody
    public List<Dept> getDeptAll(){
        return deptServices.getAll();
    }

}
